﻿using BeetleX.XRPC;
using System;
using System.Reflection;
using System.Text;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            StartServer();
            Console.ReadLine();
        }
        private static void StartServer()
        {
            XRPCServer server = new XRPCServer();
            server.RPCOptions.LogToConsole = true;
            server.RPCOptions.LogToFile = false;
            server.ServerOptions.DefaultListen.Port = 9999;
            server.ServerOptions.ExecutionContextEnabled = true;
            server.ServerOptions.Encoding = Encoding.UTF8;
            server.Register(Assembly.GetExecutingAssembly());
            server.Open();
            Console.WriteLine("Server started!");
        }
    }
}
